<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/jquery-3.4.1.min.js"></script>
		<script>
			$(function(){
				//$("h1").text("sssss");
				$("h1").each(function(i,o){
					//this ,o是dom元素
					//o.innerHTML="这是第"+i+"个h1";
					$(o).html("这是第"+i+"个h1标题");
				});
				let d3=$("div")[2];
				d3.innerHTML="第三个Div";
				$("#d4").siblings().css("color","red");
				$("#d4").find("a").text("拼多多");//找下级
			});
		</script>
	</head>
	<body>
		<div>111</div>
		<div>222</div>
		<div>aaaa</div>
		<div id="d4">bbb
		  <a href="#">taobao</a>
		  <span>jd</span>
		</div>
		<h1>1</h1>
		<h1>2</h1>
		<h1>3</h1>
		<h1>4</h1>
		<h1>5</h1>
	</body>
</html>